jade.content.abs
Class AbsPrimitive

java.lang.Object
  |
  +--jade.content.abs.AbsObject
        |
        +--jade.content.abs.AbsTerm
              |
              +--jade.content.abs.AbsPrimitive

public class AbsPrimitive
extends AbsTerm

Author:
Paola Turci, Federico Bergenti - Universita` di Parma
See Also:
Serialized Form

Constructor Summary
AbsPrimitive(java.lang.String kind)
          Constructor.
AbsPrimitive(java.lang.String kind, java.lang.Object value)
          Constructor.
 
Method Summary
protected  void dump(int indent)
           
 boolean getBoolean()
          Get a boolean value.
 float getFloat()
          Gets a float value.
 int getInteger()
          Gets an integer value.
 java.lang.Object getObject()
           
 java.lang.String getString()
          Gets a string value.
 void set(boolean value)
          Sets a boolean value.
 void set(float value)
          Sets a float value.
 void set(int value)
          Sets an integer value.
 void set(java.lang.String value)
          Sets a string value.
static java.lang.Object toObject(AbsPrimitive abs)
           
static AbsPrimitive wrap(boolean value)
           
static AbsPrimitive wrap(float value)
           
static AbsPrimitive wrap(int value)
           
static AbsPrimitive wrap(java.lang.String value)
           
 
Methods inherited from class jade.content.abs.AbsObject
dump, getAbsObject, getCount, getNames, getTypeName, isGrounded, set
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbsPrimitive

public AbsPrimitive(java.lang.String kind,
                    java.lang.Object value)
Constructor.
Parameters:
kind - name of the type of the primitive.
value - value of the primitive.

AbsPrimitive

public AbsPrimitive(java.lang.String kind)
Constructor.
Parameters:
kind - name of the type of the primitive.
Method Detail

wrap

public static AbsPrimitive wrap(java.lang.String value)

wrap

public static AbsPrimitive wrap(boolean value)

wrap

public static AbsPrimitive wrap(int value)

wrap

public static AbsPrimitive wrap(float value)

toObject

public static java.lang.Object toObject(AbsPrimitive abs)

set

public void set(java.lang.String value)
Sets a string value.
Parameters:
value - the value to set.

set

public void set(boolean value)
Sets a boolean value.
Parameters:
value - the value to set.

set

public void set(int value)
Sets an integer value.
Parameters:
value - the value to set.

set

public void set(float value)
Sets a float value.
Parameters:
value - the value to set.

getString

public java.lang.String getString()
Gets a string value.
Returns:
the string.

getInteger

public int getInteger()
Gets an integer value.
Returns:
the integer.

getFloat

public float getFloat()
Gets a float value.
Returns:
the float.

getBoolean

public boolean getBoolean()
Get a boolean value.
Returns:
the boolean.

getObject

public java.lang.Object getObject()

dump

protected void dump(int indent)
Overrides:
dump in class AbsObject